home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / programming / other / esa / esa.readme < prev    next >
Text File  |  1999-04-19  |  1KB  |  37 lines

  1. Short:    Extended Syntax Assembly v1.8
  2. Author:   bevilacq@cli.di.unipi.it (Simone Bevilacqua)
  3. Uploader: bevilacq@cli.di.unipi.it (Simone Bevilacqua)
  4. Type:     dev/asm
  5. Requires: 020+ CPU, KS 2.0
  6. Replaces: dev/asm/ESA.lha
  7.  
  8. Ever heard of "inline asm" inside C, Pascal, etc. ?
  9. Well, here we have "inline C, Pascal, etc." inside asm!
  10.  
  11.  
  12. Look below: that's a small sample of ESA code!!!
  13.  
  14.  
  15.                 procedure CpyQtd{a1-a2},d0-d1/a1-a2
  16.                 move.b       (a1)+,d0                 ;get "quote"
  17.                 repeat
  18.                  move.b      (a1)+,d1
  19.  
  20.                  switch.s d1.b
  21.                  -> d0                                ;successful copy
  22.                     clr.b    (a1)                     ;NULL-termination
  23.                     moveq.l  #0,d1                    ;exit loop
  24.                  -> #0                                ;unvalid char, exit loop
  25.                     suba.l   a1,a1                    ;please, let it be...
  26.                  -> #10                               ;unvalid char
  27.                     moveq.l  #0,d1                    ;exit loop
  28.                     suba.l   a1,a1                    ;please, let it be...
  29.                  def
  30.                     move.b   d1,(a2)+                 ;copy char
  31.                  eswitch
  32.  
  33.                 until.s ~d1.b
  34.                 movea.l      a1,a0                    ;new string ptr
  35.  
  36.                 eproc
  37.